Have you ever run your PowerBook on batteries and had to wait until the system spun down the hard drive automatically? Considering that the hard drive is one of the hungriest power hogs of the system, that isn’t so great. There are a few utilities to spin down the drive, but all the ones I've seen require you to use the mouse, or pull down a menu, etc.
Here's a solution to the problem:
Included here are 5 copies of FKEY, each with a different ID number. So, if you want to spin down the hard drive by typing command-shift-6, you should use the one numbered 6. If you want to type command-shift-5, use the one numbered 5. Simple.
When you hit the hot key, your hard drive will spin down. No muss, no fuss.
SpinDown follows the “Apple Approved” method of spinning down the drive, and does not hook into any undocumented traps, or patch any code in the Power Manager, so you don’t need to worry about it breaking a piece of software in the future.
You need to have a machine that has the "extended Power Manager" available for SpinDown to do its work. Most of the more recent PowerBooks contain this software.
Lastly, if you spin down the drive, and the system needs something on the disk, it will turn right around and spin the drive back up again - sometimes even before the drive stops spinning!
Since some programs cannot function wihout a constantly spinning hard drive (for timing or whatever reason), SpinDown will not be able to spin down the drive while these programs are running.
Installation:
If you are using System 7.1 or greater, you can stick one of these in the Fonts folder (yes, I know, they aren’t fonts, but the System thinks they are). You don’t even need to reboot. For the easiest install with System 7.1 or greater, just drag the file to the System Folder icon. The Finder will ask you if you want to put the file where it belongs. Click on “OK”, and you’re all set.
If you are using a System older than 7.1, you can use Suitcase or something similar, or hold your breath and use ResEdit to install one.
These programs are public domain (heck, you know it was a simple program to write when the documentation is five or six times longer than the source code), so feel free to give them to anyone and everyone. Please do include these instructions though.
Customization:
The first time I sent out FKEYs I got a lot of people mailing me asking me why there weren’t files for the numbers from 0 to 4. Well, you see Apple has reserved those numbers for its own use, and if I put SpinDown on them, I might collide with something Apple did later on. Still, if you really, really want to use one of those numbers for SpinDown, you can use ResEdit to change the resource ID#. Be warned that if you make it 1 or 2, you lose the original uses for those keys, which was the magic-eject of your internal and external floppy drive. Since nowadays barely anyone has a second floppy drive, this most likely isn’t a problem. If you want to use ID#3, you must edit your System file to remove the “screen shot” FKEY, which takes a picture of your desktop for you. Not a good idea. As far as I know, ID#4 isn’t used anymore (it used to be the screen dump to the ImageWriter printer). It seems that ID#0 was never used for anything in particular.
One last thought: The resource is sent out to be memory-resident. This is to make things a bit more comfortable for people who use PowerBooks in noisy environments. You can just hit the key at any time, and if the drive isn’t already stopped, it will spin down. If the drive is already stopped, nothing will happen. You don’t actually need to know if it is spinning when you hit the key.
If you feel the need to save 100 bytes, you can open the file with ResEdit, open the FKEY resource, then select “Get Resource Info” from the Resource menu. Just switch off “Preload”, and switch on “Purgeable”, and leave the rest of the flags alone. Note, however, that if you do this, you may be in the silly situation of spinning up your hard drive only to spin it down again...
Any questions, comments, or chocolate chip cookies to <David.Shaw@acm.org>